<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript"
	src="http://code.jquery.com/jquery-1.6.4.min.js"></script>
<link rel="stylesheet" href="resources/css/patient/deathjindan.css">
<script src="resources/js/jquery-1.6.4.min.js"></script>
<script src="resources/js/jquery.PrintArea.js_4.js"></script>
<script src="resources/js/jquery.printElement.js"></script>
<title>사망 진단서</title>
<script type="text/javascript">
	$(document).ready(function(){
		$("#printBtn").click(function(){
			$("#cheobangjeontb").printElement({
				printMode: 'popup', 
				pageTitle:'cheobangjeon.jsp', 
				overrideElementCSS:['<c:url value="resources/css/office/deathjindan.css"/>', { href:'<c:url value="resources/css/office/deathjindan.css"/>',media:'print' }],
				leaveOpen:false 
			});
		});
	});

	/* 파일이름 지정하지 않고 엑셀 저장
	$("#btnExcel").live("click", function () {
		window.open('data:application/vnd.ms-excel,' + encodeURIComponent($("#cheobangjeontb").html()))
		 e.preventDefault();
		}); */
	
	//파일 이름 지정해서 엑셀 저장	
	$("#btnExcel").live("click", function () {
        var a = document.createElement('a');
        var data_type = 'data:application/vnd.ms-excel';
        var table_html = encodeURIComponent($("#cheobangjeontb").html());
        a.href = data_type + ', ' + table_html;
        a.download = '[사망진단서].xls';
        
        a.click();
        e.preventDefault();
	});

		
	
		
		
</script>

</head>
<body>
<div class="samang">
	<img alt="" class="printBtn" style="width:60px;height:60px; margin-top: 13px; " src="resources/images/officeword[black].png" id="btnExcel">
	<img alt="" src="resources/images/print-icon.jpg" class="printBtn" id="printBtn">
	<a href="cheobang.do"><img alt="" src="resources/images/xbutton.png" class="xBtn" id="close"></a>
</div>
<div class="body">
<h2>사　　망　　진　　단　　서</h2>
<br>
<br>

<table>
<tr><th colspan="1">진단서 등록번호</th><td colspan="3">123123123</td></tr>
<tr><th colspan="1">환자 이름</th><td colspan="3">김상진</td></tr>
<tr><th>사망일자</th><td>2014-09-04</td><th>사망진단번호</th><td>123123123</td></tr>
<tr><th colspan="1">사망장소</th><td colspan="3">kosta화장실</td></tr>
<tr><th colspan="4">의사소견</th></tr>
<tr><td colspan="4" rowspan="3"><textarea rows="18" cols="82" placeholder="의사소견"></textarea></td></tr>
<tr></tr><tr></tr>
<tr><th colspan="2">진단서발행일자</th><td colspan="2">2014-09-04</td></tr>
<tr><th colspan="2">담당의사</th><td colspan="2">박지만</td></tr>
<tr class="bottomTr"><td colspan="4">위와 같이 진단(검안)함</tr>
<tr class="bottomTr"><td>의료기관 명칭</td><td colspan="3"></td></tr>
<tr class="bottomTr"><td>주　소 : </td><td colspan="3"></td></tr>
<tr class="bottomTr"><td>성　명 : </td><td colspan="3">　　　　　　　　　　　　　　　　　　　　　(서명)<img src="resources/images/dojang.jpg"></td></tr>

</table>




</div>



</body>
</html>